package com.leadingsoft.pwxk.enums;

public enum MonthEnum {

	January(
			1,
			"01月"),
	February(
			2,
			"02月"),
	March(
			3,
			"03月"),
	April(
			4,
			"04月"),
	May(
			5,
			"05月"),
	June(
			6,
			"06月"),
	July(
			7,
			"07月"),
	August(
			8,
			"08月"),
	September(
			9,
			"09月"),
	October(
			10,
			"10月"),
	November(
			11,
			"11月"),
	December(
			12,
			"12月");

	private int value;
	private String desc;

	MonthEnum(int value, String desc) {
		this.setValue(value);
		this.setDesc(desc);
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public static String getDescByValue(int value) {
		for (MonthEnum vEnum : MonthEnum.values()) {
			if (vEnum.getValue() == value) {
				return vEnum.getDesc();
			}
		}
		return null;
	}
}
